body.caerp {
	.select2-container {
		min-width: 9em;
		max-width: 25em;

		.select2-selection {
			background: var(--form-input-background-color);
			border: 1px solid var(--form-input-background-color);
			border-bottom-color: var(--form-input-line-color);
			border-radius: 0;
			color: var(--text-color);
			font-size: .875rem;
			line-height: 1.25rem;
			height: 2.5rem;
			padding: 0;

			&:focus {
				box-shadow: 0 1px 0 var(--form-focus-line1-color), 0 2px 0 var(--form-focus-line2-color), 0 3px 0 var(--form-focus-line3-color);
				outline: 1px dotted var(--form-focus-outline-color);
				outline-offset: 1px;
			}

			&:hover,
			&:focus {
				text-decoration: none;
			}
		    
			.select2-selection__arrow {
				background: var(--form-select-arrow) no-repeat 100% 50%;
				background-size: 1rem .75rem;
				border: 0 none;
				height: 100%;
				width: 1.25rem;

				b {
					border: 0 none;
				}
			}
		}

		.select2-selection__clear {
			background: none;
			border: 0 none;
			box-shadow: none;
			color: var(--svg-fill-color);
			font-size: 1.5rem;
			line-height: .875;
			margin: 0 .625rem 0 0;
			padding: .5rem;

			&:hover,
			&:focus,
			&:active {
				background: none;
				box-shadow: none;
				color: var(--form-icon-button-hover-color);
				text-decoration: none;
				text-shadow: 0 1px 0 var(--form-button-icon-hover-shadow);
			}
		}

		.select2-selection--single.select2-selection--clearable .select2-selection__clear {
			margin-right: 1.5rem;
		}

		.select2-selection__rendered {
			color: var(--text-color);
			line-height: 2.5rem;
			padding-left: 0;
			max-width: 100%;

			.select2-selection__choice {
				border-radius: 0;
			}

			.select2-search--inline {
				padding: 0;
				width: 100%;

				input[type="search"] {
					box-shadow: none;
					margin: 0;
					min-width: calc(100% - 1.5em);
				}

				&::after {
					background: var(--form-select-arrow) no-repeat 100% 50%;
					background-size: 1rem .75rem;
					content: "";
					display: inline-block;
					height: 2.5em;
					margin-right: -5px;
					vertical-align: bottom;
					width: 1.5em;
				}

				&:hover::after,
				&:focus::after {
					background-image: var(--form-select-arrow-hover);
				}
			}
		}

		.select2-selection--multiple {
			height: auto;
			min-height: 2.5rem;
			padding: 0;

			.select2-selection__rendered {
				line-height: 1.25;

				.select2-selection__clear {
					margin: .625rem 0 0;
				}

				.select2-selection__choice {
					background: var(--form-focus-line3-color);
					border-color: var(--form-focus-line2-color);
					border-width: 1px;
					box-shadow: 0 1px 0 var(--form-focus-line1-color), 0 2px 0 var(--form-focus-line2-color), 0 3px 0 var(--form-focus-line3-color);
					margin: var(--padding-s);
					padding: var(--padding-xs) var(--padding-s);
				}
			}

			.select2-selection__choice__remove {
				background: unset;
				border: unset;
				color: var(--text-greyed-color);
				text-align: center;
				vertical-align: middle;
				span {
					font-size: 1.5em;
					line-height: 1;
				}
				margin: -5px 0 -5px -5px;
				padding: 5px 7px;

				&:hover,
				&:focus,
				&:active {
					background: var(--form-button-background-color);
					color: var(--form-icon-button-hover-color);
				}
			}

			ul {
				min-height: 2.5rem;
				/* S'étale sur plusieurs lignes si besoin */
				white-space: normal;

				li {
					display: inline-block;
					float: none;
				}

				li.select2-search--inline {
					width: auto;

					/* Placeholder prend toute la place si champ vide */
					&:first-child {
						width: 100%;
					}

					/* Pas d'icône ↓ quand sélection multiple */
					&::after {
						content: none;
					}

					/* Évite le cadre trop resseré autour du curseur */
					input[type="search"] {
						height: 2em;
					}
					input[type="search"],
					textarea {
						min-width: 100%;
						width: auto;

					}
				}
			}
			.select2-search--inline {
				height: 0;
				width: 100%;
				/* Placeholder prend toute la place si champ vide */
				&:first-child {
					width: 100%;
				}
				/* Pas d'icône ↓ quand sélection multiple */
				&::after {
					content: none;
				}
				/* Évite le cadre trop resseré autour du curseur */
				input[type="search"],
				textarea {
					height: 0;
					min-width: 100%;
					width: auto;
				}
				&:focus-within {
					height: auto;
					textarea {
						height: auto;
					}
				}
			}
		}

		&.selection-container--focus {
			outline: none;
		}
	}

	.select2-container:not(.select2-container-disabled) {
		.select2-selection {

			&:hover .select2-selection__arrow,
			&:focus .select2-selection__arrow {
				background-image: var(--form-select-arrow-hover);
			}
		}
	}

	.select2-container.select2-container-disabled {
		.select2-selection {
			border-bottom-color: var(--border-color);
		}
	}

	.form-group[class*="col-md"],
	[class*="col-md"] > .form-group,
	.form-group.item-company_manager_id { // données relatives à l’atelier
		.select2-container {
			min-width: 100%;
			max-width: 100%;
		}
	}

	.base_menu {
		nav li>.select2-container {
			border-left-width: 0;
			padding-right: 0;
			padding-left: 0;
			max-width: 100%;
			width: 100% !important;

			.select2-selection__rendered {
				line-height: 1rem;
				padding-left: var(--menu-horizontal-padding);
			}
		}

		.select2-selection {
			font-size: 1rem;
			font-weight: bold;
			padding-left: 0;
			padding-right: var(--padding-s);

			div {
				width: 1rem;
			}
		}
	}

	.select2-dropdown {
		background: var(--form-input-background-color);
		border: 0 none;
		border-radius: 0;
		box-shadow: 0 0 4px var(--box-shadow-color);
		color: var(--text-color);

		.select2-results ul {
			font-size: .875rem;
			list-style-type: none;
			margin-top: var(--padding-s);

			ul {
				margin-top: 0;
			}
		}

		.select2-results__option[aria-selected="true"] {
			background: var(--form-select2-selectedline-color);
			color: var(--text-color);
		}

		.select2-results__option--highlighted {
			background: var(--theme-color);
			color: var(--theme-text-color);
		}

		input[type="search"] {
			border-width: 0 0 1px;
		}

		.select2-results__option {
			padding: 4px;
		}

		ul ul .select2-results__option {
			padding-left: 14px;
		}

		.select2-results__group {
			padding: 0 4px;
		}
	}

	select[multiple]+.select2-container {
		max-width: 100%;
		min-width: 100%;
	}
}

@media (max-width: $mobileWidth ) {
	body.caerp {
		.select2-container {
			max-width: calc(100vw - 30px);
		}
	}
}
